Skip to content

feat(core): support local-cache extension exclusions - #1267

Closed
QuakeWang wants to merge 4 commits into
apache:mainfrom
QuakeWang:verify-cache-exclusions
Closed

QuakeWang wants to merge 4 commits into
apache:mainfrom
QuakeWang:verify-cache-exclusions

Conversation

@QuakeWang

Copy link
Copy Markdown
Member

Purpose

Closes #971.

Local caching supports broad data selection or fixed structured-data exclusions, but cannot exclude configurable file extensions.

Brief change log

  • Add local-cache.exclude-extensions to exclude BLOB or other extensions.
  • Preserve existing behavior by default and retain write/delete invalidation.

Tests

  • 7 regression tests covering memory, disk, and shared-disk caches.
  • 189 cache tests and 77 FileIO tests passed serially.
  • Formatting, workspace Clippy, and dependency/license checks passed.

API and Format

Adds one catalog option. Storage and cache formats are unchanged.

Documentation

Updated the local-cache configuration guide.

Add optional extension exclusions to the local block cache so data files
can remain cacheable without caching BLOB bodies.

Preserve write and delete invalidation for excluded files, and cover
memory, disk and shared-disk reads with regression tests.

Closes apache#971

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
Use slash-separated paths for FileIO cache classification while retaining native paths for direct filesystem operations. Keep all exclusion and invalidation assertions enabled on Windows.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
Comment thread crates/paimon/src/io/cache/mod.rs Resolved
Add an opt-in Rust cache attachment method and pass extension exclusions
from C options without changing existing Rust or C signatures.

Reuse the local-cache parser and cover external cache bypass, default
compatibility, and write/delete invalidation in Rust and C tests.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>

@JeonDaehong JeonDaehong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the external cache path. The new C binding test and the exclusion tests pass for me on c089978.

Comment thread crates/paimon/src/io/cache/mod.rs Resolved
A filesystem alias with trailing whitespace could fill the block cache
for an excluded file because matching used the caller's path. Check the
normalized OpenDAL path before looking up blocks for full and range reads.

Cover filesystem aliases and a provider that maps a logical data file to
an excluded BLOB.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>

@JeonDaehong JeonDaehong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked cf29cd7: the new provider test fails on c089978 and passes now. The other places that use the cache without the extension check are the delete/rename/write invalidation paths, so reads are the only way an excluded file gets in. LGTM.

@JingsongLi

Copy link
Copy Markdown
Contributor

I’m not sure if this issue is still relevant; we’ve already implemented StructuredData even DedicatedData, which meets the requirements.

@QuakeWang

Copy link
Copy Markdown
Member Author

Thanks, agreed. structured-data already covers the BLOB exclusion case in #971. I don’t have a concrete use case for the extra configurability, so I’ll close this PR. Thanks for reviewing.

@QuakeWang QuakeWang closed this Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support local-cache extension exclusions

3 participants